package mException;

import designPatterns.factory.Persion;

/**
* @author jie
* @version 创建时间：2018年12月7日 上午9:43:25
* 类说明
*/
public class TryCatch {
		public static void main(String[] args) {

			String s = testFinally();
			System.out.println("testFinally result:"+s);

			try{
				Persion a =null;
				a.getClass();
				
//			}catch (NullPointerException e) {
//				// TODO: handle exception
//				System.out.println("MMMMMMMMMMM   NullPointerException");
			}catch (Exception e) {
				// TODO: handle exception
//				System.out.println("EEEEEEEEEEEEE");
				e.printStackTrace();
			}
			
		}

		public static String testFinally(){
			 try {
			 	 int result = 123/0;
			 }catch (Exception e){
			 	e.printStackTrace();
			 	return "Exception";
			 }finally {
				 System.out.println("deal :finally");
			 }

			 return "over";
		}
}
